# Group Copyright
Data related to event copyright information.

| Parameter | Description | Type | Required |
|:----------|-------------|------|----------|
| `holder`  | Holder name | string | - |
| `holder-url` | URL of the holder | string | - |
| `year` | Year till which you have copyright | ISO 8601 (tz-aware) | - |
| `licence` | Licence text | string | - |
| `licence-url` | URL of the licence location | string | -  |
| `logo-url` | URL of the logo for the Licence | string | -  |

## Event Copyright [/v1/event-copyrights{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `2`) - Page number to fetched for the paginated response.
    + sort (optional, string, `year`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.


### Create Event Copyright [POST]
Create a new Event Copyright.

+ Request (application/vnd.api+json)

    + Headers

            Authorization: JWT <Auth Key>

    + Body

            {
              "data": {
                "relationships":{
                  "event":{
                    "data": {
                      "type": "event",
                      "id": "1"
                    }
                  }
                },
                "attributes": {
                  "holder": "Name of Holder",
                  "holder-url": "http://holder-url.com",
                  "licence": "Licence text",
                  "licence-url": "http://licence-url.com",
                  "year": 2007,
                  "logo-url": "http://logo-url.com"
                },
                "type": "event-copyright"
              }
            }


+ Response 201 (application/vnd.api+json)

        {
          "data": {
            "relationships": {
              "event": {
                "links": {
                  "self": "/v1/event-copyright/1/relationships/event",
                  "related": "/v1/event-copyright/1/event"
                }
              }
            },
            "attributes": {
              "holder": "Name of Holder",
              "holder-url": "http://holder-url.com",
              "licence": "Licence text",
              "licence-url": "http://licence-url.com",
              "year": 2007,
              "deleted-at": null,
              "logo-url": "http://logo-url.com"
            },
            "type": "event-copyright",
            "id": "1",
            "links": {
              "self": "/v1/event-copyright/1"
            }
          },
          "jsonapi": {
            "version": "1.0"
          },
          "links": {
            "self": "/v1/event-copyright/1"
          }
        }


## Event Copyright Details [/v1/event-copyrights/{event_copyright_id}]
+ Parameters
    + event_copyright_id: 1 (integer) - ID of the event copyright in the form of an integer

### Event Copyright Details [GET]
+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
          "data": {
            "relationships": {
              "event": {
                "links": {
                  "self": "/v1/event-copyright/1/relationships/event",
                  "related": "/v1/event-copyright/1/event"
                }
              }
            },
            "attributes": {
              "holder": "Name of Holder",
              "holder-url": "http://holder-url.com",
              "licence": "Licence text",
              "licence-url": "http://licence-url.com",
              "year": 2007,
              "deleted-at": null,
              "logo-url": "http://logo-url.com"
            },
            "type": "event-copyright",
            "id": "1",
            "links": {
              "self": "/v1/event-copyright/1"
            }
          },
          "jsonapi": {
            "version": "1.0"
          },
          "links": {
            "self": "/v1/event-copyright/1"
          }
        }


### Update Event Copyright [PATCH]
Update a single event copyright by `id`.

+ `id` (integer) - ID of the record to update **(required)**

+ Request (application/vnd.api+json)

    + Headers

            Authorization: JWT <Auth Key>

    + Body

            {
              "data": {
                "attributes": {
                  "holder": "Name of Holder",
                  "holder-url": "http://holder-url.com",
                  "licence": "Licence text",
                  "licence-url": "http://licence-url.com",
                  "year": 2007,
                  "logo-url": "http://logo-url.com"
                },
                "type": "event-copyright",
                "id": "1"
              }
            }

+ Response 200 (application/vnd.api+json)

        {
          "data": {
            "relationships": {
              "event": {
                "links": {
                  "self": "/v1/event-copyright/1/relationships/event",
                  "related": "/v1/event-copyright/1/event"
                }
              }
            },
            "attributes": {
              "holder": "Name of Holder",
              "holder-url": "http://holder-url.com",
              "licence": "Licence text",
              "licence-url": "http://licence-url.com",
              "year": 2007,
              "deleted-at": null,
              "logo-url": "http://logo-url.com"
            },
            "type": "event-copyright",
            "id": "1",
            "links": {
              "self": "/v1/event-copyright/1"
            }
          },
          "jsonapi": {
            "version": "1.0"
          },
          "links": {
            "self": "/v1/event-copyright/1"
          }
        }

### Delete Event Copyright [DELETE]
Delete a single event copyright.

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
          "meta": {
            "message": "Object successfully deleted"
          },
          "jsonapi": {
            "version": "1.0"
          }
        }


## Get Event Copyright for an Event [/v1/events/{event_identifier}/event-copyright{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + event_identifier: 1 (string) - identifier or event id of the event. (b8324ae2 is an example of identifier)
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `2`) - Page number to fetched for the paginated response.
    + sort (optional, string, `year`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.


### Event Copyright Details [GET]
+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": {
                "relationships": {
                    "event": {
                        "links": {
                            "self": "/v1/event-copyright/1/relationships/event",
                            "related": "/v1/event-copyrights/1/event"
                        }
                    }
                },
                "attributes": {
                    "logo-url": "http://logo-url.com",
                    "holder-url": "http://holder-url.com",
                    "licence": "Licence text",
                    "year": 2007,
                    "deleted-at": null,
                    "licence-url": "http://licence-url.com",
                    "holder": "Name of Holder"
                },
                "type": "event-copyright",
                "id": "1",
                "links": {
                    "self": "/v1/event-copyright/1"
                }
            },
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/event-copyright/1"
            }
        }
